+2002-01-29 Sven Neumann <sven@gimp.org>
+
+ * gtk/gtkrc.c: don't install an empty icon_set if none of the image
+ files could be found in the pixmap_path (bug #69398).
+
2002-01-29 Sven Neumann <sven@gimp.org>
* gdk/x11/gdkimage-x11.c (_gdk_x11_copy_to_image): fixed a segfault
+2002-01-29 Sven Neumann <sven@gimp.org>
+
+ * gtk/gtkrc.c: don't install an empty icon_set if none of the image
+ files could be found in the pixmap_path (bug #69398).
+
2002-01-29 Sven Neumann <sven@gimp.org>
* gdk/x11/gdkimage-x11.c (_gdk_x11_copy_to_image): fixed a segfault
+2002-01-29 Sven Neumann <sven@gimp.org>
+
+ * gtk/gtkrc.c: don't install an empty icon_set if none of the image
+ files could be found in the pixmap_path (bug #69398).
+
2002-01-29 Sven Neumann <sven@gimp.org>
* gdk/x11/gdkimage-x11.c (_gdk_x11_copy_to_image): fixed a segfault
+2002-01-29 Sven Neumann <sven@gimp.org>
+
+ * gtk/gtkrc.c: don't install an empty icon_set if none of the image
+ files could be found in the pixmap_path (bug #69398).
+
2002-01-29 Sven Neumann <sven@gimp.org>
* gdk/x11/gdkimage-x11.c (_gdk_x11_copy_to_image): fixed a segfault
+2002-01-29 Sven Neumann <sven@gimp.org>
+
+ * gtk/gtkrc.c: don't install an empty icon_set if none of the image
+ files could be found in the pixmap_path (bug #69398).
+
2002-01-29 Sven Neumann <sven@gimp.org>
* gdk/x11/gdkimage-x11.c (_gdk_x11_copy_to_image): fixed a segfault
+2002-01-29 Sven Neumann <sven@gimp.org>
+
+ * gtk/gtkrc.c: don't install an empty icon_set if none of the image
+ files could be found in the pixmap_path (bug #69398).
+
2002-01-29 Sven Neumann <sven@gimp.org>
* gdk/x11/gdkimage-x11.c (_gdk_x11_copy_to_image): fixed a segfault
+2002-01-29 Sven Neumann <sven@gimp.org>
+
+ * gtk/gtkrc.c: don't install an empty icon_set if none of the image
+ files could be found in the pixmap_path (bug #69398).
+
2002-01-29 Sven Neumann <sven@gimp.org>
* gdk/x11/gdkimage-x11.c (_gdk_x11_copy_to_image): fixed a segfault
}
if (scanner)
- g_warning (_("Unable to locate image file in pixmap_path: \"%s\" line %d"),
- pixmap_file, scanner->line);
+ g_scanner_warn (scanner,
+ _("Unable to locate image file in pixmap_path: \"%s\""),
+ pixmap_file);
else
g_warning (_("Unable to locate image file in pixmap_path: \"%s\""),
pixmap_file);
static guint
gtk_rc_parse_icon_source (GtkRcContext *context,
GScanner *scanner,
- GtkIconSet *icon_set)
+ GtkIconSet *icon_set,
+ gboolean *icon_set_valid)
{
guint token;
GtkIconSource *source;
}
/* We continue parsing even if we didn't find the pixmap so that rest of the
- * file is read, even if the syntax is bad
+ * file is read, even if the syntax is bad. However we don't validate the
+ * icon_set so the caller can choose not to install it.
*/
token = g_scanner_get_next_token (scanner);
done:
if (gtk_icon_source_get_filename (source))
- gtk_icon_set_add_source (icon_set, source);
+ {
+ gtk_icon_set_add_source (icon_set, source);
+ *icon_set_valid = TRUE;
+ }
gtk_icon_source_free (source);
return G_TOKEN_NONE;
GtkIconFactory *factory)
{
GtkIconSet *icon_set = NULL;
+ gboolean icon_set_valid = FALSE;
gchar *stock_id = NULL;
guint token;
if (icon_set == NULL)
icon_set = gtk_icon_set_new ();
- token = gtk_rc_parse_icon_source (context, scanner, icon_set);
+ token = gtk_rc_parse_icon_source (context,
+ scanner, icon_set, &icon_set_valid);
if (token != G_TOKEN_NONE)
{
g_free (stock_id);
}
}
- if (icon_set)
+ if (icon_set && icon_set_valid)
{
gtk_icon_factory_add (factory,
stock_id,